﻿// -----------------------------------------------------------------------
// <copyright file="WorkOrder_BLL.cs" company="">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace PMSGSC.BLL
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using PMSGSC.DAL;

    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    public class WorkOrder_BLL
    {

        public static bool UpdateRoundWorkOrder(int WorkOrderID, int roundID)
        {
            return WorkOrder_DAL.UpdateRoundWorkOrder(WorkOrderID, roundID);
        }
        public static List<WorkOrder> GetWorkOrderOrderDue(int departmentID)
        {
            return WorkOrder_DAL.GetWorkOrderOrderDue(departmentID);
        }
        public static List<WorkOrder> GetWorkOrderOrderOverDue(int departmentID)
        {
            return WorkOrder_DAL.GetWorkOrderOrderOverDue(departmentID);
        }
        public static int GetAmountOfWorkOrderDue(Department department)
        {
            return WorkOrder_DAL.GetAmountOfWorkOrderDue(department);
        }
        public static void UpdateCounterOfJob(int equipID, int Value)
        {
             WorkOrder_DAL.UpdateCounterOfJob(equipID, Value);
        }
        public static WorkOrder GetWorkOrderByJobID(int jobID)
        {
            return WorkOrder_DAL.GetWorkOrderByJobID(jobID);
        }
        public static List<WorkOrder> WorkOrderHistory(int id, int shipID, bool isChanged)
        {
            return WorkOrder_DAL.WorkOrderHistory(id, shipID, isChanged);
        }
        public static List<WorkOrder> GetAll(int shipID)
        {
            return WorkOrder_DAL.GetAll(shipID);
        }
        public static List<WorkOrder> GetDataByEquipmentID(int id, int shipID, bool isChanged)
        {
            return WorkOrder_DAL.GetDataByEquipmentID(id, shipID, isChanged);
        }
        public static WorkOrder GetDataById(int id)
        {
            return WorkOrder_DAL.GetDataById(id);
        }
        public static WorkOrder GetDataByName(string name, int shipID)
        {
            return WorkOrder_DAL.GetDataByName(name, shipID);
        }
        public static WorkOrder GetDataByNumber(string code)
        {
            return WorkOrder_DAL.GetDataByNumber(code);
        }
        public static bool Insert(WorkOrder WorkOrder)
        {
            return WorkOrder_DAL.Insert(WorkOrder);
        }
        public static bool TestBeforeDelete(WorkOrder WorkOrder)
        {
            return WorkOrder_DAL.TestBeforeDelete(WorkOrder);
        }
        public static bool Update(WorkOrder WorkOrder)
        {
            return WorkOrder_DAL.Update(WorkOrder);
        }
        public static WorkOrder GetLastWorkOrder()
        {
            return WorkOrder_DAL.GetLastWorkOrder();
        }
        public static bool Delete(WorkOrder WorkOrder)
        {
            return WorkOrder_DAL.Delete(WorkOrder);
        }
        public static bool DeleteByID(int id)
        {
            return WorkOrder_DAL.DeleteByID(id);
        }
        public static int GetQuantityWorkOrder(int shipID)
        {
            return WorkOrder_DAL.GetQuantityWorkOrder(shipID);
        }
        public static bool IsExitsCodeWorkOrder(string codeWorkOrder, int shipID)
        {
            return WorkOrder_DAL.IsExitsCodeWorkOrder(codeWorkOrder, shipID);
        }
        public static bool IsExitsTitleWorkOrder(string Title, int shipID)
        {
            return WorkOrder_DAL.IsExitsTitleWorkOrder(Title, shipID);
        }
        public static List<WorkOrder> GetWork(string Number, string Title, int Component, int shipID)
        {
            return WorkOrder_DAL.GetWork(Number, Title, Component, shipID);
        }
    
    }
}
